package com.jbit.examSystem.dao;

import com.jbit.examSystem.exception.RemoveException;
import com.jbit.examSystem.pojo.Question;
import com.jbit.examSystem.pojo.TestPaper;
import com.jbit.examSystem.param.TestPaperParam;
import com.jbit.examSystem.pojo.TestPaperDetail;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TestPaperDao {
    List<TestPaper> list(TestPaperParam param);

    void insert(TestPaper testPaper);

    void update(TestPaper testPaper);

    TestPaper selectById(@Param("id") int id);

    void delete(Integer id) throws RemoveException;

    void insertDetail(@Param("questionId") Integer questionId, @Param("testPaperId") Integer testPaperId);

    List<Question> getQuestionByTestPaperId(@Param("testPaperId") Integer testPaperId);
}
